{% load klass i18n extra %}

        {% for field in form %}
        
        <div class="control-group{% if field.errors %} error{% endif %}">
            <label class="control-label" for="{{ field.auto_id }}">{{ field.label_tag }}</label>
            <div class="controls">
                {% if field.field.widget|klass == "TextInput" %}
                <input type="text" class="input-large" name="{{ field.name }}" id="{{ field.auto_id }}" value="{% if field.value %}{{ field.value }}{% endif %}">
                {% endif %}
                {% if field.field.widget|klass == "Textarea" %}
                    <textarea class="span4" name="{{ field.name }}" id="{{ field.auto_id }}" rows="4">{% if field.value %}{{ field.value }}{% endif %}</textarea>
                {% endif %}
                {% if field.field.widget|klass == "Select" %}
                    {{ field }}
                {% endif %}
                {% if field.errors %}
                    <div><span for="name" generated="true" class="error" style="display: inline; ">
                        {% for error in field.errors %}{{ error }} {% endfor %}
                    </span></div>
                {% else %}
                    {% if field.help_text %}
                        <p class="help-block"><strong>{% trans "Note" %}:</strong> {{ field.help_text }}</p>
                    {% endif %}
                {% endif %}

            </div>
        </div>
        {% endfor %}

{% comment %}
        <div class="control-group">
            <label class="control-label" for="email">Email Address</label>
            <div class="controls">
                <input type="text" class="input-large" name="email" id="email">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="subject">Subject</label>
            <div class="controls">
                <input type="text" class="input-large" name="subject" id="subject">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="message">Your Message</label>
            <div class="controls">
                <textarea class="span4" name="message" id="message" rows="4"></textarea>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="validateSelect">Select list</label>
            <div class="controls">
                <select id="validateSelect" name="validateSelect">
                    <option value="">Select...</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">Checkboxes</label>
            <div class="controls">
                <label class="checkbox">
                    <input type="checkbox" name="validateCheckbox" value="option1">
                    Option one is this and that-be sure to include why it's great
                </label>
                <label class="checkbox">
                    <input type="checkbox" name="validateCheckbox" value="option2">
                    Option two can also be checked and included in form results
                </label>
                <label class="checkbox">
                    <input type="checkbox" name="validateCheckbox" value="option3">
                    Option three can-yes, you guessed it-also be checked and included in form results
                </label>
                <p class="help-block"><strong>Note:</strong> Labels surround all the options for much larger click areas and a more usable form.</p>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">Radio buttons</label>
            <div class="controls">
                <label class="radio">
                    <input type="radio" name="validateRadio" id="validateRadio1" value="option1">
                    Option one is this and that-be sure to include why it's great
                </label>
                <label class="radio">
                    <input type="radio" name="validateRadio" id="validateRadio2" value="option2">
                    Option two can is something else and selecting it will deselect option one
                </label>
            </div>
        </div>
{% endcomment %}
